<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Wedata\V20250806\Models;
use TencentCloud\Common\AbstractModel;

/**
 * CreateDataBackfillPlan request structure.
 *
 * @method string getProjectId() Obtain Project ID
 * @method void setProjectId(string $ProjectId) Set Project ID
 * @method array getTaskIds() Obtain Backfill task collection.
 * @method void setTaskIds(array $TaskIds) Set Backfill task collection.
 * @method array getDataBackfillRangeList() Obtain Specifies the data time configuration for the backfill task.
 * @method void setDataBackfillRangeList(array $DataBackfillRangeList) Set Specifies the data time configuration for the backfill task.
 * @method string getTimeZone() Obtain Time zone, default UTC+8.
 * @method void setTimeZone(string $TimeZone) Set Time zone, default UTC+8.
 * @method string getDataBackfillPlanName() Obtain Backfill plan name. if left empty, a string of characters is randomly generated by system.
 * @method void setDataBackfillPlanName(string $DataBackfillPlanName) Set Backfill plan name. if left empty, a string of characters is randomly generated by system.
 * @method string getCheckParentType() Obtain Check parent task type. valid values: NONE (do not check ALL), ALL (check ALL upstream parent tasks), MAKE_SCOPE (only check in the currently selected tasks of the backfill plan). default: NONE (do not check).
 * @method void setCheckParentType(string $CheckParentType) Set Check parent task type. valid values: NONE (do not check ALL), ALL (check ALL upstream parent tasks), MAKE_SCOPE (only check in the currently selected tasks of the backfill plan). default: NONE (do not check).
 * @method boolean getSkipEventListening() Obtain Specifies whether to ignore event dependency for backfill. default true.
 * @method void setSkipEventListening(boolean $SkipEventListening) Set Specifies whether to ignore event dependency for backfill. default true.
 * @method string getRedefineSelfWorkflowDependency() Obtain Custom workflow self-dependency. valid values: yes or no. if not configured, use the original workflow self-dependency.
 * @method void setRedefineSelfWorkflowDependency(string $RedefineSelfWorkflowDependency) Set Custom workflow self-dependency. valid values: yes or no. if not configured, use the original workflow self-dependency.
 * @method integer getRedefineParallelNum() Obtain Customizes the degree of concurrency for instance running. if without configuring, use the existing self-dependent of the task.
 * @method void setRedefineParallelNum(integer $RedefineParallelNum) Set Customizes the degree of concurrency for instance running. if without configuring, use the existing self-dependent of the task.
 * @method string getSchedulerResourceGroupId() Obtain Scheduling resource group id. if left empty, indicates usage of the original task scheduling execution resource group.
 * @method void setSchedulerResourceGroupId(string $SchedulerResourceGroupId) Set Scheduling resource group id. if left empty, indicates usage of the original task scheduling execution resource group.
 * @method string getIntegrationResourceGroupId() Obtain Integration task resource group id. indicates usage of the original task scheduling execution resource group if empty.
 * @method void setIntegrationResourceGroupId(string $IntegrationResourceGroupId) Set Integration task resource group id. indicates usage of the original task scheduling execution resource group if empty.
 * @method array getRedefineParamList() Obtain Custom parameter. re-specifies the task's parameters to facilitate the execution of new logic by replenished instances.
 * @method void setRedefineParamList(array $RedefineParamList) Set Custom parameter. re-specifies the task's parameters to facilitate the execution of new logic by replenished instances.
 * @method string getDataTimeOrder() Obtain Backfill Execution Order - The execution order for backfill instances based on their data time. Effective only when both conditions are met:

1. Must be the same cycle task.

2. Priority is given to dependency order. If no dependencies apply, execution follows the configured order.

Valid values:

-NORMAL: No specific order (default)

-ORDER: Execute in chronological order

-REVERSE: Execute in reverse chronological order
 * @method void setDataTimeOrder(string $DataTimeOrder) Set Backfill Execution Order - The execution order for backfill instances based on their data time. Effective only when both conditions are met:

1. Must be the same cycle task.

2. Priority is given to dependency order. If no dependencies apply, execution follows the configured order.

Valid values:

-NORMAL: No specific order (default)

-ORDER: Execute in chronological order

-REVERSE: Execute in reverse chronological order
 * @method string getRedefineCycleType() Obtain Backfill Instance Regeneration Cycle - If set, this will redefine the generation cycle of backfill task instances. Currently, only daily instances can be converted into instances generated on the first day of each month.

Valid value:

MONTH_CYCLE: Monthly
 * @method void setRedefineCycleType(string $RedefineCycleType) Set Backfill Instance Regeneration Cycle - If set, this will redefine the generation cycle of backfill task instances. Currently, only daily instances can be converted into instances generated on the first day of each month.

Valid value:

MONTH_CYCLE: Monthly
 */
class CreateDataBackfillPlanRequest extends AbstractModel
{
    /**
     * @var string Project ID
     */
    public $ProjectId;

    /**
     * @var array Backfill task collection.
     */
    public $TaskIds;

    /**
     * @var array Specifies the data time configuration for the backfill task.
     */
    public $DataBackfillRangeList;

    /**
     * @var string Time zone, default UTC+8.
     */
    public $TimeZone;

    /**
     * @var string Backfill plan name. if left empty, a string of characters is randomly generated by system.
     */
    public $DataBackfillPlanName;

    /**
     * @var string Check parent task type. valid values: NONE (do not check ALL), ALL (check ALL upstream parent tasks), MAKE_SCOPE (only check in the currently selected tasks of the backfill plan). default: NONE (do not check).
     */
    public $CheckParentType;

    /**
     * @var boolean Specifies whether to ignore event dependency for backfill. default true.
     */
    public $SkipEventListening;

    /**
     * @var string Custom workflow self-dependency. valid values: yes or no. if not configured, use the original workflow self-dependency.
     */
    public $RedefineSelfWorkflowDependency;

    /**
     * @var integer Customizes the degree of concurrency for instance running. if without configuring, use the existing self-dependent of the task.
     */
    public $RedefineParallelNum;

    /**
     * @var string Scheduling resource group id. if left empty, indicates usage of the original task scheduling execution resource group.
     */
    public $SchedulerResourceGroupId;

    /**
     * @var string Integration task resource group id. indicates usage of the original task scheduling execution resource group if empty.
     */
    public $IntegrationResourceGroupId;

    /**
     * @var array Custom parameter. re-specifies the task's parameters to facilitate the execution of new logic by replenished instances.
     */
    public $RedefineParamList;

    /**
     * @var string Backfill Execution Order - The execution order for backfill instances based on their data time. Effective only when both conditions are met:

1. Must be the same cycle task.

2. Priority is given to dependency order. If no dependencies apply, execution follows the configured order.

Valid values:

-NORMAL: No specific order (default)

-ORDER: Execute in chronological order

-REVERSE: Execute in reverse chronological order
     */
    public $DataTimeOrder;

    /**
     * @var string Backfill Instance Regeneration Cycle - If set, this will redefine the generation cycle of backfill task instances. Currently, only daily instances can be converted into instances generated on the first day of each month.

Valid value:

MONTH_CYCLE: Monthly
     */
    public $RedefineCycleType;

    /**
     * @param string $ProjectId Project ID
     * @param array $TaskIds Backfill task collection.
     * @param array $DataBackfillRangeList Specifies the data time configuration for the backfill task.
     * @param string $TimeZone Time zone, default UTC+8.
     * @param string $DataBackfillPlanName Backfill plan name. if left empty, a string of characters is randomly generated by system.
     * @param string $CheckParentType Check parent task type. valid values: NONE (do not check ALL), ALL (check ALL upstream parent tasks), MAKE_SCOPE (only check in the currently selected tasks of the backfill plan). default: NONE (do not check).
     * @param boolean $SkipEventListening Specifies whether to ignore event dependency for backfill. default true.
     * @param string $RedefineSelfWorkflowDependency Custom workflow self-dependency. valid values: yes or no. if not configured, use the original workflow self-dependency.
     * @param integer $RedefineParallelNum Customizes the degree of concurrency for instance running. if without configuring, use the existing self-dependent of the task.
     * @param string $SchedulerResourceGroupId Scheduling resource group id. if left empty, indicates usage of the original task scheduling execution resource group.
     * @param string $IntegrationResourceGroupId Integration task resource group id. indicates usage of the original task scheduling execution resource group if empty.
     * @param array $RedefineParamList Custom parameter. re-specifies the task's parameters to facilitate the execution of new logic by replenished instances.
     * @param string $DataTimeOrder Backfill Execution Order - The execution order for backfill instances based on their data time. Effective only when both conditions are met:

1. Must be the same cycle task.

2. Priority is given to dependency order. If no dependencies apply, execution follows the configured order.

Valid values:

-NORMAL: No specific order (default)

-ORDER: Execute in chronological order

-REVERSE: Execute in reverse chronological order
     * @param string $RedefineCycleType Backfill Instance Regeneration Cycle - If set, this will redefine the generation cycle of backfill task instances. Currently, only daily instances can be converted into instances generated on the first day of each month.

Valid value:

MONTH_CYCLE: Monthly
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("ProjectId",$param) and $param["ProjectId"] !== null) {
            $this->ProjectId = $param["ProjectId"];
        }

        if (array_key_exists("TaskIds",$param) and $param["TaskIds"] !== null) {
            $this->TaskIds = $param["TaskIds"];
        }

        if (array_key_exists("DataBackfillRangeList",$param) and $param["DataBackfillRangeList"] !== null) {
            $this->DataBackfillRangeList = [];
            foreach ($param["DataBackfillRangeList"] as $key => $value){
                $obj = new DataBackfillRange();
                $obj->deserialize($value);
                array_push($this->DataBackfillRangeList, $obj);
            }
        }

        if (array_key_exists("TimeZone",$param) and $param["TimeZone"] !== null) {
            $this->TimeZone = $param["TimeZone"];
        }

        if (array_key_exists("DataBackfillPlanName",$param) and $param["DataBackfillPlanName"] !== null) {
            $this->DataBackfillPlanName = $param["DataBackfillPlanName"];
        }

        if (array_key_exists("CheckParentType",$param) and $param["CheckParentType"] !== null) {
            $this->CheckParentType = $param["CheckParentType"];
        }

        if (array_key_exists("SkipEventListening",$param) and $param["SkipEventListening"] !== null) {
            $this->SkipEventListening = $param["SkipEventListening"];
        }

        if (array_key_exists("RedefineSelfWorkflowDependency",$param) and $param["RedefineSelfWorkflowDependency"] !== null) {
            $this->RedefineSelfWorkflowDependency = $param["RedefineSelfWorkflowDependency"];
        }

        if (array_key_exists("RedefineParallelNum",$param) and $param["RedefineParallelNum"] !== null) {
            $this->RedefineParallelNum = $param["RedefineParallelNum"];
        }

        if (array_key_exists("SchedulerResourceGroupId",$param) and $param["SchedulerResourceGroupId"] !== null) {
            $this->SchedulerResourceGroupId = $param["SchedulerResourceGroupId"];
        }

        if (array_key_exists("IntegrationResourceGroupId",$param) and $param["IntegrationResourceGroupId"] !== null) {
            $this->IntegrationResourceGroupId = $param["IntegrationResourceGroupId"];
        }

        if (array_key_exists("RedefineParamList",$param) and $param["RedefineParamList"] !== null) {
            $this->RedefineParamList = [];
            foreach ($param["RedefineParamList"] as $key => $value){
                $obj = new KVPair();
                $obj->deserialize($value);
                array_push($this->RedefineParamList, $obj);
            }
        }

        if (array_key_exists("DataTimeOrder",$param) and $param["DataTimeOrder"] !== null) {
            $this->DataTimeOrder = $param["DataTimeOrder"];
        }

        if (array_key_exists("RedefineCycleType",$param) and $param["RedefineCycleType"] !== null) {
            $this->RedefineCycleType = $param["RedefineCycleType"];
        }
    }
}
